# address_parse.py
import sys, json, cpca, io


# 确保 sys.stdout 用 UTF-8
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
# 从命令行读取地址参数
addresses = sys.argv[1:]
df = cpca.transform(addresses)

# 输出为 JSON，方便 Java 解析
print(df.to_json(orient='records', force_ascii=False))


